﻿using System.Collections.Generic;
using System.Linq;
using Headsight.BPMN2WF.BPMN.Schemas;

namespace Headsight.BPMN2WF.BPMN.Model
{
    /// <summary>
    /// <see cref="BPMNSequenceFlowFactory"/> default implementation.
    /// </summary>
    public class BPMNSequenceFlowFactoryImpl : BPMNSequenceFlowFactory
    {
        public override IList<BPMNSequenceFlow> CreateBPMNSequenceFlows(tProcess tProcess, BPMNProcessFactoryParams bpmnMFacParams)
        {
            return tProcess.Items.Where(x => x.GetType() == typeof(tSequenceFlow)).Select(x => new BPMNSequenceFlow((tSequenceFlow)x)).ToList();
        }
    }
}